<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>积分记录管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../component/elementUI/index.css">
    <link rel="stylesheet" href="../../../style/wangeditor.css">
    <link rel="stylesheet" href="../../../style/index.css">

</head>
<body>
    <div id="app" v-cloak>
        <el-form :inline="true" :form="form">
            <el-form-item>
                <el-select v-model.trim="form.Activity_SerialNumber" clearable style="width: 100%;"
                    placeholder="请选择活动列表">
                    <el-option v-for="item in Activity" :key="item.Activity_SerialNumber" :label="item.Activity_Name"
                        :value="item.Activity_SerialNumber"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-input v-model.trim="form.Member_Name" clearable placeholder="请输入用户昵称/手机号" />
            </el-form-item>
            <el-form-item>
                <el-input v-model.trim="form.Points_Title" clearable placeholder="请输入账单标题" />
            </el-form-item>
            <el-form-item>
                <el-date-picker prefix-icon="el-icon-date" v-model="form.Operation_Date" clearable type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"
                    range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSerach">查询</el-button>
            </el-form-item>
            <el-form-item>
                <yl-button type="success" :data="ExportData" :loading="loading" @click="Export(form)">积分记录导出</yl-button>
            </el-form-item>
            <el-form-item>
                <el-dropdown trigger="click" @command="downloadTemplate">
                    <el-button type="primary">
                        下载导入模板<i class="el-icon-arrow-down el-icon--right"></i>
                    </el-button>
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item command="Points">内部用户积分变动模板</el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
            </el-form-item>
            <el-form-item>
                <el-dropdown trigger="click" @command="importTemplate">
                    <el-button type="danger">
                        批量导入<i class="el-icon-arrow-down el-icon--right"></i>
                    </el-button>
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item command="Points">导入内部用户积分变动模板</el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
            </el-form-item>
        </el-form>
        <el-table :data="tableData" stripe border height="calc(100vh - 140px)" style="width: 100%">
            <el-table-column align="center" type="index" label="序号" width="50"></el-table-column>
            <el-table-column align="center" min-width="160" prop="Log_SerialNumber" label="日志流水号"></el-table-column>
            <el-table-column align="center" prop="Member_Name" label="用户姓名"></el-table-column>
            <el-table-column align="center" min-width="120" prop="Member_SerialNumber" label="用户手机号"></el-table-column>
            <el-table-column align="center" prop="Points_Title" label="账单标题"></el-table-column>
            <el-table-column align="center" prop="Department_Name" label="分配部门"></el-table-column>
            <el-table-column align="center" prop="Activity_Name" label="活动"></el-table-column>
            <el-table-column align="center" prop="Points" label="类型" width="70">
                <template v-slot="{row}">
                    {{parseInt(row.Points) > 0?'收入':'支出'}}
                </template>
            </el-table-column>
            <el-table-column align="center" prop="Points" label="数字明细"></el-table-column>
            <el-table-column align="center" prop="Points_Type" label="积分类型">
                <template v-slot="{row}">
                    {{Type(row.Points_Type)}}
                </template>
            </el-table-column>
            <el-table-column align="center" min-width="100" prop="Remain_Points" label="活动剩余积分"></el-table-column>
            <el-table-column align="center" min-width="120" prop="Operation_Datetime" label="操作时间">
                <template v-slot="{row}">
                    {{getYMDHMSDate(row.Operation_Datetime)}}
                </template>
            </el-table-column>
        </el-table>
        <el-pagination style="margin-top: 5px;" background @size-change="handleSizeChange"
            @current-change="handleCurrentChange" :current-page="form.page" :page-sizes="[20, 30, 50]"
            :page-size="form.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
        </el-pagination>
    </div>
    <script type="text/javascript" src="../../../utils/wangeditor.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.min.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../../utils/vuex.min.js"></script>
    <script type="text/javascript" src="../../../component/elementUI/index.js"></script>
    <script type="text/javascript" src="../../../component/component.js"></script>
    <script type="text/javascript" src="../../../utils/FileSaver.min.js"></script>
    <script type="text/javascript" src="../../../utils/FileSaver.js"></script>
    <script type="text/javascript" src="../../../utils/xlsx.full.min.js"></script>
    <script type="text/javascript" src="../../../utils/xlsx.core.min.js"></script>
    <script type="text/javascript" src="../../../config/config.js"></script>
    <script type="text/javascript" src="../../../utils/compressor.js"></script>
    <script type="text/javascript" src="../../../utils/ID_Validity.js"></script>
    <script type="text/javascript" src="../../../utils/utils.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
</body>

</html>